import { request } from 'umi';

export async function dyCpsUsers(body: any, options?: { [key: string]: any }) {
  return request('/api/dyCpsUsers', {
    method: 'POST',
    data: { ...body, token: localStorage.getItem('token') },
    ...(options || {}),
  });
}

export async function dyCpsUserRegister(body: any, options?: { [key: string]: any }) {
  return request('/api/dyCpsUserRegister', {
    method: 'POST',
    data: { ...body, token: localStorage.getItem('token') },
    ...(options || {}),
  });
}
export async function getFlowOrderExcel(body: any, options?: { [key: string]: any }) {
  return request('/api/getFlowOrderExcel', {
    method: 'POST',
    data: { ...body, token: localStorage.getItem('token') },
    ...(options || {}),
  });
}

export async function promoteProducts(body: any, options?: { [key: string]: any }) {
  return request('/api/promoteProducts', {
    method: 'POST',
    data: { ...body, token: localStorage.getItem('token') },
    ...(options || {}),
  });
}
export async function createDyCpsChannel(body: any, options?: { [key: string]: any }) {
  return request('/api/createDyCpsChannel', {
    method: 'POST',
    data: { ...body, token: localStorage.getItem('token') },
    ...(options || {}),
  });
}

export async function followDyOrder(body: any, options?: { [key: string]: any }) {
  return request('/api/followDyOrder', {
    method: 'POST',
    data: { ...body, token: localStorage.getItem('token') },
    ...(options || {}),
  });
}
export async function saveFlowOrders(body: any, options?: { [key: string]: any }) {
  return request('/api/saveFlowOrders', {
    method: 'POST',
    data: { ...body, token: localStorage.getItem('token') },
    ...(options || {}),
  });
}
export async function queryOrders(body: any, options?: { [key: string]: any }) {
  return request('/api/queryOrders', {
    method: 'POST',
    data: { ...body, token: localStorage.getItem('token') },
    ...(options || {}),
  });
}
export async function getHistoryOrders(body: any, options?: { [key: string]: any }) {
  return request('/api/getHistoryOrders', {
    method: 'POST',
    data: { ...body, token: localStorage.getItem('token') },
    ...(options || {}),
  });
}
export async function dyCpsChannelProductCollect(body: any, options?: { [key: string]: any }) {
  return request('/api/dyCpsChannelProductCollect', {
    method: 'POST',
    data: { ...body, token: localStorage.getItem('token') },
    ...(options || {}),
  });
}
